x86/HVM: assorted RTC emulation adjustments
authorJan Beulich <jbeulich@suse.com>
Tue, 11 Sep 2012 08:00:06 +0000 (10:00 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 11 Sep 2012 08:00:06 +0000 (10:00 +0200)
commit14b4f06bf77b603957661aa966b249f81332d116
treeae9f58b886490f0b6c9b147eefa0bec8d04f0050
parent7d6a4f3bee868a36e892abcd4112b03117ebcb5e
x86/HVM: assorted RTC emulation adjustments

- don't look at RTC_PIE in rtc_timer_update(), and hence don't call the
  function on REG_B writes at all
- only call alarm_timer_update() on REG_B writes when relevant bits
  change
- only call check_update_timer() on REG_B writes when SET changes
- instead properly handle AF and PF when the guest is not also setting
  AIE/PIE respectively (for UF this was already the case, only a
  comment was slightly inaccurate)
- raise the RTC IRQ not only when UIE gets set while UF was already
  set, but generalize this to cover AIE and PIE as well
- properly mask off bit 7 when retrieving the hour values in
  alarm_timer_update(), and properly use RTC_HOURS_ALARM's bit 7 when
  converting from 12- to 24-hour value
- also handle the two other possible clock bases
- use RTC_* names in a couple of places where literal numbers were used
  so far

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/hvm/rtc.c
xen/arch/x86/hvm/vpt.c
xen/include/asm-x86/hvm/vpt.h